<!-- Toast.vue -->
<template>
    <Transition>
        <div v-if="fans_alert.show.value" class="sign-in d-flex justify-center align-center">
            <div class="box d-flex flex-column align-center">
                <span class="closebtn iconfont icon-31guanbi" @click="() => fans_alert.close()"></span>
                <img :src="sigin" alt="" class="j-img" draggable="false" />
                <div class="btns">
                    <span class="btn" @click="fans_alert.bind()">Has Follow</span>
                    <span class="btn" @click="fans_alert.goBind()">Go Follow</span>
                </div>
            </div>
        </div>
    </Transition>
</template>
<script setup lang="ts">
import sigin from "@/assets/cir.png";
import { fans_alert } from './script/fans_alert';
</script>

<style scoped lang="less">
.sign-in {
    user-select: none;
    -webkit-user-drag: none;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 6;

    .box {
        padding: 2vw;
        background: #1D1F24;
        border-radius: 12px;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        position: relative;

        .closebtn {
            --pos: 2%;
            position: absolute;
            top: var(--pos);
            right: calc(var(--pos) * 1.5);
        }

        .btns {
            display: flex;
            gap: 10px;

            .btn {
                text-align: center;
                color: black;
                padding: 10px 20px;
                border-radius: 4px;
                background-color: var(--main);
                margin-top: 40px;

                &:active {
                    scale: 0.98;
                }
            }
        }
    }

    background-color: rgba(0, 0, 0, 0.2);
}

.d-tt {
    font-size: 24px;
    margin-bottom: 12px;
}

.v-enter-active,
.v-leave-active {
    transition: opacity 0.5s ease;
}

.v-enter-from,
.v-leave-to {
    opacity: 0;
}

.j-img {
    width: 160px;
    height: 129px;
    object-fit: contain;
    margin-bottom: 0%;
}
</style>
